from rest_framework import serializers
from accounts.models import *


class infoSerializers(serializers.ModelSerializer):
    class Meta:
        model = Info
        fields = '__all__'


class TeacherSerializers(serializers.ModelSerializer):
    class Meta:
        model = Info
        fields = ('id', 'name', 'sex', 'age', 'dept', 'position', 'power', 'station', 'avatar', 'background')


class ClassSerializers(serializers.ModelSerializer):
    class Meta:
        model = Dept
        fields = '__all__'


class FractionSerializers(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Info
        fields = ('id', 'name', 'number', 'credit')


class DepartmentSerializers(serializers.ModelSerializer):
    class Meta:
        model = Dept
        fields = '__all__'
